<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        #div{
            margin: 50px auto;
        }
    </style>
</head>
<body>
    <div id="div"></div>
    <input type="button" value="开始" id="input1"/>
    <input type="button" value="结束" id="input2"/>
</body>
<script>
    var a="dfe,ef,efe,ef,gerg,fe";
    var b= a.split(",");
    var num= b.length;
    setInterval(change,100);
    function change(){
          document.getElementById("div").innerHTML=b[parseInt(Math.random()*num)];
          console.log(b[parseInt(Math.random()*num)]);
    }
//    alert(Math.random());
</script>
</html>